#!/usr/bin/env python3

def main():
    l = input("请输入字符串: ").split()
    l.reverse()
    print(' '.join(l))

if __name__ == "__main__":
    main()
